home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / bash_114.zip / bash-1.14.2 / lib / termcap / Makefile next >
Makefile  |  1993-07-06  |  2KB  |  65 lines

  1. ## -*- text -*- ####################################################
  2. #                                   #
  3. # Makefile for termcap replacement libbrary.               #
  4. #                                   #
  5. ####################################################################
  6.  
  7. # Here is a rule for making .o files from .c files that doesn't force
  8. # the type of the machine (like -sun3) into the flags.
  9. .c.o:
  10.     $(CC) -c $(CFLAGS) $(LOCAL_INCLUDES) $(CPPFLAGS) $*.c
  11.  
  12. # Destination installation directory.  The libraries are copied to DESTDIR
  13. # when you do a `make install'.
  14. DESTDIR = /usr/local/lib
  15.  
  16. DEBUG_FLAGS = -g
  17. #OPTIMIZE_FLAGS = -O
  18. LDFLAGS = $(DEBUG_FLAGS) 
  19. CFLAGS = $(DEBUG_FLAGS) $(OPTIMIZE_FLAGS)
  20.  
  21. SHELL = /bin/sh
  22.  
  23. # A good alternative is gcc -traditional.
  24. #CC = gcc -traditional
  25. CC = cc
  26. RANLIB = /usr/bin/ranlib
  27. AR = ar
  28. RM = rm
  29. CP = cp
  30.  
  31. CSOURCES = termcap.c tparam.c
  32.  
  33. SOURCES  = $(CSOURCES)
  34.  
  35. OBJECTS = termcap.o tparam.o
  36.  
  37. DOCUMENTATION = termcap.texinfo
  38.  
  39. THINGS_TO_TAR = $(SOURCES) $(DOCUMENTATION)
  40.  
  41. ##########################################################################
  42.  
  43. all: libtermcap.a
  44.  
  45. libtermcap.a:    $(OBJECTS)
  46.         $(RM) -f $@
  47.         $(AR) clq $@ $(OBJECTS)
  48.         -if [ -f "$(RANLIB)" ]; then $(RANLIB) $@ ; fi
  49.  
  50. termcap.tar:    $(THINGS_TO_TAR)
  51.         tar -cf $@ $(THINGS_TO_TAR)
  52.  
  53. termcap.tar.Z:    termcap.tar
  54.         compress -f termcap.tar
  55.  
  56. install:    $(DESTDIR)/libtermcap.a
  57.  
  58. clean:
  59.         rm -f *.o *.a *.log *.cp *.tp *.vr *.fn *.aux *.pg *.toc
  60.  
  61. $(DESTDIR)/libtermcap.a: libtermcap.a
  62.         -mv $(DESTDIR)/libtermcap.a $(DESTDIR)/libtermcap.old
  63.         cp libtermcap.a $@
  64.         if [ -f "$(RANLIB) ]; then $(RANLIB) -t $@
  65.